<script setup lang="ts">
  let url = [
    "https://ws878.com/android/saidun.apk",
    "https://ws878.com/windows/exe/saidun.exe",
    "http://saidun-gw6.s3-website.ap-east-1.amazonaws.com/help/appstore.html",
  ]
  let openUrl = (url)=>{
    // 创建一个临时的a标签
    const link = document.createElement('a');
    link.href = url;

    // 设置下载属性（如果需要）
    link.setAttribute('download', 'filename.zip');

    // 模拟点击下载
    document.body.appendChild(link);
    link.click();

    // 清理DOM
    document.body.removeChild(link);

  }
</script>

<template>
  <div class="load">
    <div class="head">
      <div class="img"></div>
      赛盾加速器
    </div>
    <div class="txtImg"></div>
    <div class="btm" @click="openUrl(url[0])">
      <div class="img1"></div>
      Andriod 版下载
    </div>
    <div class="btm" @click="openUrl(url[1])">
      <div class="img2"></div>
      ios版下载
    </div>
    <div class="btm" @click="openUrl(url[2])">
      <div class="img3"></div>
      其他下载
    </div>
  </div>
</template>

<style scoped lang="scss">
.load::-webkit-scrollbar{
  width: 0;
}
  .load{
    width: 100vw;
    height: 100vh;
    background-color: #4957F5;
    background-image: url("@/assets/images/download/bg1.png");
    background-repeat: no-repeat;
    background-size: 100% auto;
    position: relative;
    overflow: hidden;
    overflow-y: scroll;
    .head{
      width: 100%;
      height: 33px;
      margin: 23px auto 47px;
      display: flex;
      align-items: center;
      .img{
        width: 33px;
        height: 33px;
        background-image: url("@/assets/images/download/icon.png");
        background-repeat: no-repeat;
        background-size: 100% auto;
        margin-left: 23px;
        margin-right: 11px;
      }
      font-family: txtP, sans-serif;
      font-weight: 400;
      font-size: 17px;
      color: #FFFFFF;
      line-height: 17px;
    }
    .txtImg{
      width: 344px;
      height: 87px;
      margin: 0 auto 401px;
      background-image: url("@/assets/images/download/txt1.png");
      background-repeat: no-repeat;
      background-size: 100% auto;
    }
    .btm{
      width: 278px;
      height: 52px;
      background-image: url("@/assets/images/download/btm.png");
      background-repeat: no-repeat;
      background-size: 100% auto;
      display: flex;
      justify-content: center;
      align-items: center;
      font-family: Poppins, sans-serif;
      font-weight: bold;
      font-size: 18px;
      margin: 0 auto 12px;
      color: #FFFFFF;
      line-height: 26px;
      .img1{
        width: 22px;
        height: 22px;
        background-image: url("@/assets/images/download/icon1.png");
        background-repeat: no-repeat;
        background-size: 100% auto;
        margin-right: 5px;
      }
      .img2{
        width: 18px;
        height: 22px;
        background-image: url("@/assets/images/download/icon2.png");
        background-repeat: no-repeat;
        background-size: 100% auto;
        margin-right: 5px;
      }
      .img3{
        width: 22px;
        height: 22px;
        background-image: url("@/assets/images/download/icon3.png");
        background-repeat: no-repeat;
        background-size: 100% auto;
        margin-right: 5px;
      }
    }
  }
</style>